﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //中石油域名认证
        string domain = "ptr";
        string adPath = "LDAP://ptr.petrochina/DC=ptr,DC=petrochina";
        LdapAuthentication la = new LdapAuthentication(adPath);
        string userName = "";
        string passWord = "";

        if (la.IsAuthenticated(domain, userName,passWord))  //通过认证
        {
            //用户权限处理
        }
    }
}
